package cn.wolfcode.service;

import cn.wolfcode.domain.Employee;
import cn.wolfcode.domain.Permission;
import cn.wolfcode.domain.Role;
import cn.wolfcode.qo.QueryObject;
import com.github.pagehelper.PageInfo;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.ServletOutputStream;
import java.io.IOException;
import java.util.List;

public interface IEmployeeService {
    void insert(Employee employee);

    void delete(Long id);

    void update(Employee employee);

    Employee selectOne(Long id);

    List<Employee> selectAll();

    PageInfo<Employee> getPageInfo(QueryObject qo);

    void insertEmployeeAndRole(Long eId,Long rId);

    List<Role> selectRole(Long id);

    void deleteEmployeeAndRole(Long id);

    Employee checkUser(String username,String password);

    List<Permission> getPermission(Long id);

    void exportXls(ServletOutputStream outputStream) throws IOException;

    void importXls(MultipartFile file) throws IOException;

    Long  getId(String keyword);
}
